import { AcceptanceManageAPI } from '../common/type';

/** 材料列表搜索 */
const getSearchColumns = ({ materlelStatusList, assetBrandType, assetSourceType }): AcceptanceManageAPI.IHeaderSearchType => {
  return [
    {
      name: 'assetName',
      placeholder: '材料名称',
      label: '材料名称',
      componentType: 'Input',
      allowClear: true,
      md: 6,
      sm: 24,
      whetherSenior: false,
    },
    {
      name: 'assetState',
      placeholder: '材料状态',
      label: '材料状态',
      componentType: 'Select',
      dataSource: materlelStatusList,
      allowClear: true,
      md: 6,
      sm: 24,
      whetherSenior: false,
    },
    {
      name: 'createTime',
      placeholder: '入库',
      label: '入库',
      componentType: 'RangePicker',
      allowClear: true,
      md: 12,
      sm: 24,
      whetherSenior: false,
    },
    {
      name: 'brandType',
      placeholder: '品牌',
      label: '品牌',
      componentType: 'Select',
      dataSource: assetBrandType,
      allowClear: true,
      md: 6,
      sm: 24,
      whetherSenior: true,
    },
    {
      name: 'sourceType',
      placeholder: '来源',
      label: '来源',
      componentType: 'Select',
      dataSource: assetSourceType,
      allowClear: true,
      md: 6,
      sm: 24,
      whetherSenior: true,
    },
  ];
};

export { getSearchColumns };
